{% extends "layout/main.html" %}
{% block css %}<!-- Morris Charts CSS -->
<link rel="stylesheet" href="http://cdn.bootcss.com/morris.js/0.5.1/morris.css">{% end %}
{% block title %}福娃后台{% end %}
{% block contents %}<div class="row">
    <div class="col-lg-12">
        <h3 class="page-header">预览 <small>统计时间: {{ v["sync_time"] }}</small></h3>
    </div>
    <!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
    <div class="col-lg-3 col-md-6">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_count"] }}</div>
                        <div>福娃总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>

    <div class="col-lg-3 col-md-6">
        <div class="panel panel-green">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_i_count"] }}</div>
                        <div>缘份福娃总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa/i">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>


    <div class="col-lg-3 col-md-6">
        <div class="panel panel-yellow">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_c_count"] }}</div>
                        <div>寻宝福娃总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa/c">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>


    <div class="col-lg-3 col-md-6">
        <div class="panel panel-red">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_i_hide"] }}</div>
                        <div>缘份已藏总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa/hide">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>

    <div class="col-lg-3 col-md-6">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_i_caught"] }}</div>
                        <div>缘份已抓总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa/cau">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>



    <div class="col-lg-3 col-md-6">
        <div class="panel panel-green">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_c_hide"] }}</div>
                        <div>寻宝已藏总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa/hide">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>

    <div class="col-lg-3 col-md-6">
        <div class="panel panel-yellow">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa fa-comments fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">{{ v["fu_c_caught"] }}</div>
                        <div>寻宝已抓总数</div>
                    </div>
                </div>
            </div>
            <a href="/fuwa/cau">
                <div class="panel-footer">
                    <span class="pull-left">查看详情</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>

</div>

<!-- /.row -->
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                相比前天数据
            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
                <div id="day-bar-chart"></div>
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
</div>
<!-- /.row -->{% end %}

{% block js %}<script src="http://cdn.bootcss.com/raphael/2.2.7/raphael.min.js"></script>
<script src="http://cdn.bootcss.com/morris.js/0.5.1/morris.min.js"></script>
<script>
    $(function () {
        Morris.Bar({
            element: 'day-bar-chart',
            data: [{
                y: '福娃总数',
                a: {{ yday["fu_count"] }},
                b: {{ v["fu_count"] }}
            }, {
                y: '缘份',
                a: {{ yday["fu_i_count"] }},
                b: {{ v["fu_i_count"] }}
            }, {
                y: '寻宝',
                a: {{ yday["fu_c_count"] }},
                b: {{ v["fu_c_count"] }}
            }, {
                y: '缘份已藏',
                a: {{ yday["fu_i_hide"] }},
                b: {{ v["fu_i_hide"] }}
            }, {
                y: '寻宝已藏',
                a: {{ yday["fu_c_hide"] }},
                b: {{ v["fu_c_hide"] }}
            }, {
                y: '缘份已抓',
                a: {{ yday["fu_i_caught"] }},
                b: {{ v["fu_i_caught"] }}
            }, {
                y: '寻宝已抓',
                a: {{ yday["fu_c_caught"] }},
                b: {{ v["fu_c_caught"] }}
            }, {
                y: '已兑奖数',
                a: {{ yday["awarded"] }},
                b: {{ v["awarded"] }}
            }],
            xkey: 'y',
            ykeys: ['a', 'b'],
            labels: ['前天', '今天'],
            hideHover: 'auto',
            resize: true
        });
    });
</script>{% end %}